<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>统计字符串个数</title>
		<script type="text/javascript">
			var arr=new Array("Americe","Greece","Britain","Canada","China","Egypt");
			var count=0;
			for(var i in arr){
				if(arr[i].indexOf('a')!=-1||arr[i].indexOf('A')!=-1){
					console.log(arr[i]);
					count++;
				}
			}
			document.write(count);
		</script>
	</head>
	<body>
	</body>
</html>
